import http from '@/utils/httpRequest'
import ApiUrl from '@/constant/api-url'
let config = {
  headers: {
    'Content-Type': 'multipart/form-data;charset=utf-8'
  },
  transformRequest: [function (data) {
    return data
  }]
}

const databaseApi = {
  /**
   * 查询所有数据库
   */
  queryAllDatabase: function () {
    return http({
      baseURL: ApiUrl.API_HOST_BASE,
      url: http.adornUrl('api/operation/database-manage/all-database'),
      method: 'post'
    })
  },

  /**
   * 查询指定表所有字段
   */
  queryAllColumn: function (params) {
    return http({
      baseURL: ApiUrl.API_HOST_BASE,
      url: http.adornUrl('api/operation/database-manage/all-column'),
      method: 'post',
      params: http.adornParams(params)
    })
  }

}

export default databaseApi